package com.zzx.threekingdom.view;


import android.os.Handler;
import android.os.Message;

public abstract class NotifyHandler extends Handler
{
    abstract public void onNotify();
    
    private final static int NOTIFY_WHAT = 1;
    
    public void notifyListener()
    {
        removeMessages(NOTIFY_WHAT);
        sendMessage(obtainMessage(NOTIFY_WHAT));
    }
    
    public void handleMessage (Message msg)
    {
        if(msg.what==NOTIFY_WHAT)
        {
            onNotify();
        }
    }

}
